home *** CD-ROM | disk | FTP | other *** search
- TBC
-
- (Title Bar Clock)
- (also known as Threapwood's Big Clock)
-
- by David M Hollway
-
- -= Giftware =-
-
- Version 2.52 (8:55pm, 12th June 1994)
-
-
- Contents
- --------
-
- 1) Introduction
- 2) Disclaimer
- 3) Installation
- 4) User Options
- 5) Tooltypes
- 6) Contacting the Author
- 7) Version History
- What's new in 2.5
-
-
- 1) Introduction
-
- Earlier this year I downloaded (from Aminet) a program called HFK,
- written by Herbert West. HFK displays a simple clock in the left-hand
- end of the Workbench screen title-bar. Importantly, it uses the correct
- colour scheme (even on Kickstart 3.0), ie the same colours as the Workbench
- menus. I like HFK, because it is fully Kickstart 3.0 compatible, and
- simple.
- However, I had one tiny quibble with HFK. If I wanted to change the
- Workbench preferences, then I had to quit HFK, otherwise IPrefs
- displayed a requester saying "Please close all windows". This really
- annoyed me (because I often change screenmodes, and it was really tedious
- to quit & restart HFK each time). Then I hit upon the solution: I wrote
- a simple AmigaDOS script that would quit HFK and then re-start it after
- a short delay (to give IPrefs time to close & re-open the Workbench
- screen). I left the icon for this script on the Workbench, so all that I
- had to do was double-click the icon just before changing screenmode.
- An elegant solution. Or so I thought.
-
- But then one day I was idly reading the "Libraries" RKM (as one does :-) ),
- and I noticed a section about "notification" requests. So "Hey!" I thought,
- "why don't I write a program that will watch the ENV:Sys directory, and
- then when anything is written to this directory, close down & restart
- HFK?". So I did. That, too, seemed like an elegant solution at the time.
- But then I started thinking that this was a really kludgy solution (to have
- two programs running), and I decided to write a replacement for HFK.
-
- So here's the replacement: TBC!
- TBC is a great program (IMHO ;-) ) offering the following features:
-
- o will automatically hide itself to allow
- IPrefs to reset the screen
- o very low CPU load
- o fully WB3.0 compatible & enhanced
- o can display time in a variety of
- formats (24 hour, 12 hour etc)
- o colours used for display can be altered
- o requires OS 2.04 (v37) and above
- o Alarm Clock feature
- that will, at a configurable time,
- flash the screen/play a sample/beep/
- launch a command (optional).
- o Fully configurable by means of tooltypes
- or GUI
- o Ability to appear automatically on the
- active screen
- o will optionally chime every n minutes
- o can also display current date in choice
- of formats
- o as of v2.5, TBC can warn you if your Amiga's
- memory is running low
-
- Yes, yes, I know, it's a long feature list for a clock program, but
- I just can't stop adding to this program..
-
-
-
- 2) Disclaimer
-
- Just in case there are any Americans reading this:
-
- This program is (C) 1994 David M Hollway.
- I take absolutely no responsibility for any damage or loss resulting
- from the use of this program.
- If TBC causes your computer to explode, wiping out 3/4 of your home
- country, it's not my fault.
- If TBC causes the value of your investment portfolio to plummet, it's
- not my fault.
- If TBC causes your aunt to break out in bright green spots and start
- speaking in tongues, again, it's NOT MY FAULT.
-
- "Amiga", "Kickstart", "Lorraine" and "Marketing" are (C) Commodore-Amiga,
- Inc.
-
- Never trust a dog with orange eyebrows.
-
-
- This program has been tested on the author's A4000-030. under both
- Kickstarts 2.04 (37.175) and 3.0 (39.106), and Workbenches 3.0 & 3.1
- (err.. a registered-developer friend of mine came over and tested it
- under 3.1? ;-) )
-
- It's also been tested on a stock Amiga B2000HD (68000 based),
- and an A1200 with 6MB of RAM. No problems have been found.
-
-
- If it doesn't work on your system, PLEASE let me know! I'm especially
- interested to hear from you if you've tried TBC (successfully or
- otherwise) on a 68000-based Amiga. See the end of this documentation
- for information on contacting me!
-
-
-
-
- 3) Installation
-
- Easy. Just copy the "TBC" program (and its icon) to a suitable place on
- your disk. If you want TBC to load automatically when you boot, then
- place it in the "WBstartup" drawer of your "SYS:" partition or disk.
-
- That's it. TBC will now run using the default settings.
- To get the best out of TBC however, you should configure it using
- its tooltypes (see section 5 for more details).
-
-
-
- 4) User Options
-
- Click with the left mouse button on the TBC window to bring up the
- "TBC Configuration" window.
-
- Options are:
-
- "Foreground:" : click on a colour in this box, and the text of the
- TBC display will be rendered in this colour.
-
- "Background:" : click on a colour in this box, and the background
- of the TBC display will be rendered in this
- colour.
-
- "Use Pens:" : if this gadget is "ticked", then TBC will use the
- same colours as the Workbench menus. Under
- kickstart 2.0x, this means grey-on-black.
- Under 3.x, the menu colours can be set using
- the "Palette" preferences editor.
-
- "Time:" : select an option from this gadget. TBC can display
- the time in one of four formats:
-
- "6:34 pm" - 12 hour clock
- "6:34:00" - 12 hour clock with seconds display.
- "18:34" - 24 hour clock
- "18:34:00" - 24 hour clock with seconds display.
-
- "Date:" : As for "Time:" above, TBC can display the current
- date in a choice of formats. These are:
-
- "No Date" - Don't display the date
- "25.12.94" - Display date in dd.mm.yy format
- "12.25.94" - Display date in mm.dd.yy format
-
- If the date is displayed, then the clock display
- will, each time it updates, toggle between the
- current time and the current date.
-
- "Update (seconds)" : enter a number n in the text box next to this
- option, and the clock will be updated each time
- n seconds have elapsed.
-
- "Leap (danger!):" : If you select this option, then TBC will always
- appear on the currently active screen.
-
- *CAUTION*
- If TBC is displayed on a "non public" screen,
- and that screen is closed by an application,
- you MAY WELL crash the Amiga.
- Always make sure that you close TBC (or de-select
- this option) before closing the application.
-
- As an extra safeguard, TBC will not leap onto
- a screen unless:
-
- a) The screen is wider than 600 pixels
- (this rules out most games)
- b) The screen has a title.
- This is to prevent TBC leaping onto the
- screen opened by a screenblanker
- program, which would (as soon as you
- moved the mouse) crash the screenblanker.
-
- Programs whose screens TBC will leap on to
- include:
- Directory Opus v4.x
- Final Copy
- Final Writer
- PCTask
- Scribble!
-
- But sadly not DPaint, because it does naughty
- things with screen overlays etc, and doesn't have
- a title (it just prints "DPaint" in its title bar)
- Additionally, as of version 2.2 of TBC, I've
- added a small (1 second) delay before TBC "leaps"
- onto a newly active screen.
- I can't make this feature totally safe, but if you
- take care, it's very handy.
- *CAUTION ENDS*
-
- If this option is switched off, TBC will appear
- on the default public screen.
-
- "Alarm Hour:" : use this slider to set the hour at which the alarm
- will sound (in 24-hour format, 0 to 23).
-
- "Alarm Min:" : use this slider to set the minutes at which the
- alarm will sound, ie 0 to 59.
-
- "Chime each:" : if you enter a number other than 0 in this box
- then TBC will "chime" each time the "minutes
- past the hour" reach a multiple of that number.
- For example, entering 15 will cause TBC to chime
- at xx.00, xx.15, xx.30, and xx.45.
-
- "Alarm:" : This cyclebox determines the current state of
- the alarm feature.
- It can have the following settings:
-
- "No Alarm" - Alarm is OFF.
- "Flash" - Alarm is ON, and when alarm-time
- is reached, the screen will flash
- (and beep/play a sample if you
- have Workbench 3.x) repeatedly.
- "Command" - Alarm is ON, and when alarm-time
- is reached, a command or AmigaDOS
- script (see "Command:" below) will
- be launched.
- "Do Both" - The above two options combined.
-
- Once the alarm is sounding, it can be stopped
- by clicking with the left mouse button on the
- TBC display. If the options screen is being
- displayed when the alarm goes off, you can stop
- the alarm by setting this cycle-gadget to
- "No Alarm"
-
- "Command:" : If you enter a command in this text-box,
- and set the "alarm" gadget to "Command" or "Do
- Both", then when TBC sounds its alarm it will
- also run the command for you. You must give the
- command's name with its full path, for example:
- SYS:Utilities/Clock
- - will run the standard WB clock (why??)
- SYS:Tools/HDTools/Quarterback
- - will run a hard-disk backup program
-
- Note that this can either be a command, or an
- AmigaDOS script. If the latter, then the script
- must have its "script" protection bit set, for
- example type at a shell:
-
- 1.System3.0:> protect mydisk:myscript +S
- "If free mem is less
- than:" : Type a number into this text box, set the
- cycle gadget next to it to anything other than
- "ignore it", and lo! you will be warned by TBC
- when the amount of free memory (FAST + CHIP)
- falls below that number of Kilobytes.
- The options that can be set on the cycle gadget
- are:
-
- "ignore it" - doesn't do anything when memory
- is low
- "flash screen" - Uses the O/S DisplayBeep()
- function to flash the screen
- (or play a sample/beep if you're
- using 3.0)
- "show requester" - Displays a Recoverable Alert
- when memory is below n K.
- An Alert is always a chilling
- sight, so I'd recommend that
- you:
- a) remember not to panic when
- you see it, and
- b) use this option if you're
- expecting memory to get
- VERY low (such that
- neither a requester nor a
- beep can be used)
-
- "Use" : click here to close the options window, and use
- the current TBC settings.
-
- "Hide" : click here to hide the TBC window, to allow IPrefs
- to reset the WB screen. TBC will automagically
- re-appear after a short delay (see TOOLTYPES).
- This option is handy if you've changed screenmodes
- or font, but TBC has re-appeared before IPrefs
- has been able to reset the WB screen (leading
- to a "Attempting to close Workbench - Please
- close all windows except drawers" requester).
-
- "About" : click here to display some information about the
- program.
-
- "Quit" : click here to exit from TBC (why would you want to
- do this??)
-
-
-
- 5) Workbench Tooltypes
-
- By default, TBC displays a 12-hour clock, in the current workbench menu
- colours, updating its display every second.
-
- If you would like the initial options to differ from the defaults, you can
- specify the options by means of TOOLTYPES (if you're not sure how to do
- this, consult a Workbench manual).
-
- TBC supports the following tooltypes:
-
- NONEWLOOK : this can be set to either 0 (to use the current WB
- colours), or 1 (to use the user-defined fixed colour
- scheme).
-
- DELAY : this is the number of seconds that will elapse between
- successive updates of the TBC display. Sensible values
- are between 1 and 60. Very silly values are 4000, 99 and
- "ni".
-
- FOREPEN : the pen to use for the writing on the display, ie with
- the default Workbench 2.x palette, a value of 1 would be
- black.
-
- BACKPEN : the pen to use for the background of the TBC display. Don't
- set this to the same value as FOREPEN, becauses you won't
- be able to see the display!
- *NOTE*: If the NONEWLOOK tooltype is either not specified,
- or set to 0, then the values of FOREPEN and BACKPEN will
- be ignored.
-
- FORMAT : set this to either 0, 1 or 2, to get one of the following
- TBC displays:
-
- 0 - time in format 6:34 pm
- 1 - time in format 6:34:00
- 2 - time in format 18:34
- 3 - time in format 18:34:00
-
- IPREFSWAIT : Yes, by popular demand here's a tooltype that allows you to
- set the delay (in seconds) that TBC allows for IPrefs to reset
- the WB screen. For example, if you specify IPREFWAIT=7, then
- when the screenmode/font etc of the WB is changed, TBC will
- hide its window for 7 seconds.
- A higher value of IPREFSWAIT than the default may be needed
- if IPrefs has a lot of work to do when resetting the WB,
- eg closing many drawers, etc.
-
- ** USERS OF TBC v1.x PLEASE TAKE NOTE **
- This tooltype is now IPREFS rather than IPREF (note the
- extra 'S')!
-
- ALARM : This determines the initial state of the alarm feature.
- Valid options are:
-
- 0 - Alarm is OFF.
- 1 - Alarm is ON, and when alarm-time is reached,
- the screen will flash (and beep/play a sample
- if you have Workbench 3.x) repeatedly.
- 2 - Alarm is ON, and when alarm-time is reached,
- a command or AmigaDOS script (set using
- ALARMRUN) will be launched.
- 3 - 1 & 2 combined.
-
- ALARMHOUR : The hour of the alarm, in 24-hour format, eg valid options
- range from ALARMHOUR=0 to ALARMHOUR=23.
-
- ALARMMIN : This tooltype sets the alarm minutes; valid options range
- from ALARMMIN=0 to ALARMMIN=59.
-
- ALARMRUN : This can be used to specify a command to be run when the
- alarm is activated. For example:
-
- ALARMRUN=SYS:Prefs/Palette
-
- For more information, see section 4 (Options).
-
- CHIME : This is the chime setting (see section 4)
- eg: CHIME=15
-
- DATE : This is the date format setting, eg:
-
- DATE=0 means no date is displayed
- DATE=1 means date is displayed as dd.mm.yy
- DATE=2 means date is displayed as mm.dd.yy
-
- SCREENLEAP : Set this option to enable/disable screen leaping.
- eg: SCREENLEAP=1 or SCREENLEAP=0
-
- MEMWARN : This is the amount of memory (in K) below which TBC
- will alert you..
-
- WARNTYPE : ..and this is how TBC will alert you. Valid options are:
-
- WARNTYPE=0 means "do nothing"
- WARNTYPE=1 means "flash the screen once"
- WARNTYPE=2 means "display a requester"
- WARNTYPE=3 means "display an alert"
-
- See section (4) "User Options" for more details!
-
-
- In addition you'll need to specify the tooltype DONOTWAIT if you've
- placed TBC in your SYS:WBStartup drawer. If you don't, then you'll see
- a requester saying "TBC has not returned - Shall I wait some more?"
- every time you reboot. This is a real pain in the proverbials, and is
- caused not by TBC but by Kickstart.
-
-
-
-
- 6) Contacting the Author
-
- This small trifle has been released as GIFTWARE. This means that if you
- use and like the program, the author (that's me) would welcome a gift from
- you. Please note that this is not compulsory - I hate "Crippleware", so
- I've released this fully working version of TBC (ha! the program has
- hardly any features to begin with.. if I crippled some features the
- program wouldn't do anything :-) ) and I'd love to get a gift from people.
-
- This gift can be *anything* you feel the program is worth.. if nothing else,
- send me some e-mail (address below), a postcard of your home town, or
- even write to me! I'm not expecting anybody to send me a 4000-040, but you
- never know... here's some suggestions for gifts anyway :-)
-
- - a funny/ funky / impressive Sound/Noise/ProTracker module
- - ditto, but in MED/ OctaMED format
- - a humorous anecdote
- - a postcard
- - a letter to say "thank you"
- - an e-mail message
- - vast amounts of money
- - free beer (here's hoping...)
-
-
- If you are Swiss I'd especially like to hear from you, as I'm going to that
- wonderful country for a year (as of July 1994).
-
- I can be contacted in the following ways (in order of preference):
-
- by e-mail: I have two internet addresses, so mail sent to either
-
- dmh11@tower.york.ac.uk
- or dmh-a@minster.york.ac.uk
-
- should reach me.
-
-
- by snail-mail: Bit tricky this one, because of the above mentioned
- Swiss trip. Probably the best address to send mail to
- is:
-
-
- DM Hollway,
- Langwith College,
- University of York,
- Heslington,
- York,
- YO1 5DD
-
- by telepathy: Just concentrate «:-)
-
- Anybody interested can get the full source-code for TBC by writing to me,
- and enclosing sufficient money to cover postage from the UK to their
- country (unless they're writing by e-mail of course).
-
- If you find a bug in TBC, *PLEASE LET ME KNOW*! TBC has grown from its
- humble origins to its even more humble present state :-) because of
- feedback from YOU the user!
-
-
-
- 7) Version History
-
- Version 0.9: Initial release.
- Finally trapped and squashed termination bug (thanks
- Edd!), and added "time format" option.
- Made program 2.04+ compatible.
-
- Version 0.91: Never publicly released.
- Added 50fps parallax-scrolling shoot-em-up game,
- featuring 256 colour sprites on AGA machines.
- "A Classic" said 'Amiga World' magazine.
-
- Version 1.0: Second release.
- Removed game (see above).
- Made clock continue ticking when options window is
- displayed.
- Added IPREFWAIT tooltype.
- Added 24-hour + seconds time-format option.
- Cleared up a couple of minor bugs (bug-ettes?)
-
- Version 1.1: Third Release.
- Considered whether to add game again, but then
- decided not to embarrass Team-17.
- Added Alarm-clock option, obtained by means
- of sliders in options window, and three new
- tooltypes: ALARMHOUR, ALARMMIN, and ALARM.
-
- Version 1.2: Never released.
- Totally re-designed the user interface.
- Squashed a bug or two (nothing too major).
-
- Version 2.0: Fourth public release. (8th May 1994)
- Added "Alarm Run" feature.
- Cleaned up & optimised code somewhat. It may not
- be smaller, but it's neater!
-
- Version 2.01: Never released.
- Tiny, tiny bug fix.
- Made BOTH colons "tick" on clock display.
- Happy, Fergus? :-)
- Altered user interface layout slightly. (transposed
- ALARM and UPDATE areas, if you must know)
-
- Version 2.1: Fifth public release (15th May 1994)
- Added CHIME, DATE and LEAP options (and tooltypes)
- Altered user interface layout to accomodate
- new options.
- Drastically cleaned up & optimised code, with the
- result that this new version is only about 500 bytes
- larger than v2.0, despite the new features.
-
- Version 2.2: Sixth public release (17th May 1994)
- Whoops.. there were a couple of fairly major bugs in
- version 2.1 - occasional screen corruption occurred
- if the clock used a proportional font. That's now
- fixed (I hope!). TBC has now been tested with fonts
- up to 24pt. If you have to use a bigger font than that,
- then your eyes need seeing to!
- Improved the ALARM function, so that now you can choose
- whether to have a beep, run a command, or both when
- the alarm goes off. (see 'Options' and 'Tooltypes')
- Replaced RectFill() calls with SetRast(), saving a few
- bytes. Code should now be bug-free. I bet I'll regret
- saying that!
-
- Version 2.2.1: Yes.. I do regret saying that! There was a tiny bug
- in TBC v2.2 that caused the ALARM tooltype to be
- ignored. That's now fixed. And I've updated the
- documentation properly too.
-
- Version 2.5: Hmm... a couple of silly bugs in previous versions :-(
- In fact even as I write this I've noticed another bug!
- Just a moment.... ...there, that's fixed the swine.
- As I was saying: in this version I've added a "memory
- warning" feature, and also TBC will now report 12:00am
- as 12:00 am, whereas in all previous versions it
- reported it as 0:00am. In addition, previous versions
- changed from "am" to "pm" at 1:xx, rather than 12:xx.
- Many thanks to the two people in the U.S who reported
- those bugs!
-
- Version 2.51: Well, my beta-testers have failed miserably :-)
- NOBODY reported the fact that in 2.5 the entire alarm
- feature didn't work! Many thanks to Slingshot of
- Dimentia UK who was the only person observant enough
- to notice this! Duh... It's a good job I didn't release
- 2.5 publicly :-)
-
- Version 2.52: Well this bug's got me confused.. for some reason, if I
- set the "seconds" string to _5_ spaces in 24-hour mode,
- (ie "16:34") then the current hour gets printed instead
- of the five spaces.. but if I set it to _6_ spaces, it
- gets printed as expected! Weird! Anybody out there have
- an idea why this is the case? Anyway, it's fixed now!
-